package com.example.chatty.logic.utils

import android.app.Activity
import android.content.Context
import android.view.inputmethod.InputMethodManager
import androidx.core.content.getSystemService

fun Context.hideIME() {
    val inputMethodManager: InputMethodManager? = getSystemService<InputMethodManager>()
    inputMethodManager?.hideSoftInputFromWindow(
        (this as Activity).currentFocus?.windowToken,
        InputMethodManager.HIDE_NOT_ALWAYS
    )
}